<?php include_partial('genericComponent/rightTitle', array('title' => 'Galerie photos')); ?>

<ul id="scrolling-photos">
    <?php
    $first_photo = true;
    foreach($photos_list as $photo){?>
        <?php $imagesAttributes = Utils::getImageSize($photo['sfAsset'][ 'Folder' ][ 'relative_path' ], $photo['sfAsset'], 240, 195); ?>
        <li class="photo" <?php echo ($first_photo ? '' : 'style="display: none;"') ?>>
            <a href="<?php echo url_for('@gallery_photos_show_detail_photo?title_slug=' . $photo[ 'Category' ][ 'slug' ] . '&filename_slug=' .$photo['sfAsset'][ 'slug' ]) ?>">
                <img style="margin-top: <?php echo $imagesAttributes['small']['marginTop'] ?>px; margin-left: <?php echo $imagesAttributes['small']['marginLeft'] ?>px"
                     title="<?php echo $photo['sfAsset']['slug'] ?>" alt="<?php echo $photo['sfAsset']['slug'] ?>"
                     src="<?php echo $imagesAttributes['small']['url'] ?>" width="<?php echo $imagesAttributes['small']['width'] ?>" height="<?php echo $imagesAttributes['small']['height'] ?>" />
            </a>
        </li>
    <?php 
    $first_photo = false;
    }?>
</ul>